<?php
namespace app\common\model;

class Page extends BaseModel{

	/**
	 * 文章内容获取器
	 * @param  string $content [description]
	 * @param  array  $data    [description]
	 * @return [type]          [description]
	 */
	public function getContentAttr($content = '', $data = array()){
		$content    = $content ? $content : $data['content'];
		$content    = model('File')->html_file_url_oss($content);

		return $content ? $content : '';
	}
	/**
	 * 文章内容修改器
	 * @param string $content [description]
	 * @param array  $data    [description]
	 */
	public function setContentAttr($content = '', $data = array()){
		$content = $content ? $content : $data['content'];
		$content = model('File')->html_osspath_local($content);

		return $content ? $content : '';
	}
}